//
//  zhizhen.m
//  C8_指针
//
//  Created by dllo on 15/10/15.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "zhizhen.h"

void maopao(int *p, int count)
{

    for (int i = 0; i < count - 1; i++) {
        for (int j = 0; j < count - i - 1; j++) {
            if (p[j] > p[j + 1]) {
                int temp = *(p + j);
                p[j] = *(p + j + 1);
                p[j + 1] = temp;
            }
        }
    }
    for (int i = 0; i < count; i++) {
        printf("%d ", p[i]);
    }
}




